#include <stdio.h>
#include <stdlib.h>
#ifndef ___STACK___
#define ___STACK___

typedef struct stack stack_t;

extern struct stack *create_stack(int size);
/* 入栈：向栈顶存入数据 */
extern int push_stack(struct stack *p, int data);
/* 出栈：取出栈顶数据，并从栈中删除 */
extern int pop_stack(struct stack *p, int *databuf);
/* 读取栈顶元素值 */
extern int get_top_stack(struct stack *p, int *databuf);
extern void print(struct stack *p);
extern int is_empty_stack(struct stack *p);
extern int is_full_stack(struct stack *p);
extern int des_stack(struct stack **pp);
extern int clean_stack(struct stack *p);

#endif

